import request from '@/utils/request'

// 登录图片验证码
export const getCaptcha = (clientToken) => request.get(`/api/user-service/user/imageCode/${clientToken}`, {
  Headers: { 'Content-Type': 'application/json' },
  responseType: 'arraybuffer'
})
// 获取当时工单汇总信息(人员统计头部信息)
export const taskReportInfo = params => request.get(`/api/task-service/task/taskReportInfo/${params.start}/${params.end}`)
// 销售总数
export const orderCount = data => request.get('/api/order-service/report/orderCount', {
  params: {
    ...data
  }
})
// 销售额
export const orderAmount = data => request.get('/api/order-service/report/orderAmount',
  {
    params: {
      ...data
    }
  })
// 获取商圈下销量前10
export const business = (businessId) => request.get(`/api/vm-service/sku/businessTop10/${businessId}`, {
  Headers: { 'Content-Type': 'application/json' }
})
// 合作商
export const partners = () => request.get('/api/vm-service/node/nodeCollect')
// 获取点位
export const point = () => request.get('/api/vm-service/node/count')
// 根据地区汇总销售额数据
export const regionCollect = params => request.get(`/api/order-service/report/regionCollect/${params.start}/${params.end}`)

// 获取销售额统计
export const ountCollect = params => request.get(`/api/order-service/report/amountCollect/${params.collectType}/${params.start}/${params.end}`)
// 排名top10
export const skuTop = params => request.get(`/api/order-service/report/skuTop/${params.topValue}/${params.start}/${params.end}`)
